import { createApp } from "vue";
import App from "./App.vue";
import "./assets/global.less";
import components from "./components/global";
import Router from "./router/index";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "element-plus/theme-chalk/dark/css-vars.css";
import locale from "element-plus/es/locale/lang/zh-cn";
import "./assets/style/index.scss";
import store from "./store";


const app = createApp(App);

import * as ElementPlusIconsVue from "@element-plus/icons-vue";
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}


// components
for (const i in components) {
  app.component(i, components[i]);
}

app.use(ElementPlus, {
  locale: locale,
  // 支持 large、default、small
  size: "default",
});
app.use(store);

app.use(Router).mount("#app");
